<?php

use yii\helpers\Html;
use app\assets\AppAsset;

AppAsset::register($this);
?>
<?php $this->beginPage() ?>
<!DOCTYPE html>
<html lang="<?= Yii::$app->language ?>">
<head lang="en">
    <meta charset="<?= Yii::$app->charset ?>">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <meta name="format-detection" content="telephone=no">
    <meta name="renderer" content="webkit">
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
    <link rel="alternate icon" type="image/png" href="/static/i/favicon.png">
    <?= Html::csrfMetaTags() ?>
    <title><?= $this->params['active'] == 'index'? Yii::$app->params['blogName'] . ' - ' .Yii::$app->params['blogEtc'] : Html::encode($this->title)  .  ' - ' . Yii::$app->params['blogName'] . ' - ' .Yii::$app->params['blogEtc'] ?></title>
    <?php $this->head() //引入AppAsset css?>
    <?php if (isset($this->blocks['css'])): ?>
    	<?= $this->blocks['css'] ?>
	<?php endif; ?>
</head>
<body class="blog-bg-f0f0f0">
<?php $this->beginBody() ?>
<div class="wrap">
    <header class="am-topbar am-topbar-inverse">
      <div class="blog-g-fixed">
          <h1 class="am-topbar-brand">
            <a href="/">Sickeeer's Blog!</a>
          </h1>

          <button class="am-topbar-btn am-topbar-toggle am-btn am-btn-sm am-btn-success am-show-sm-only"
                  data-am-collapse="{target: '#doc-topbar-collapse'}"><span class="am-sr-only">导航切换</span> <span
              class="am-icon-bars"></span></button>

          <div class="am-collapse am-topbar-collapse" id="doc-topbar-collapse">
            <ul class="am-nav am-nav-pills am-topbar-nav">
              <li class="<?= $this->params['active']=='index'?"am-active":"" ?>"><a href="/">首页</a></li>
              <li class="<?= $this->params['active']=='article'?"am-active":"" ?>"><a href="/article">文章</a></li>
              <!-- <li class="<?= $this->params['active']=='tree'?"am-active":"" ?>"><a href="/tree.html">树栈</a></li> -->
              <!-- <li><a href="tags.html">标签</a></li> -->

              <li class="am-dropdown" data-am-dropdown>
                <a class="am-dropdown-toggle" data-am-dropdown-toggle href="javascript:;">
                  更多</span>
                </a>
                <ul class="am-dropdown-content">
                  <li><a href="/about.html">我</a></li>
                  <li><a href="/post.html">投稿</a></li>
                </ul>
              </li>
            </ul>

            <!-- <form style="margin-bottom:0" class="am-topbar-form am-topbar-left am-form-inline am-topbar-right" role="search">
              <div class="am-form-group">
                <input type="text" class="am-form-field am-input-sm" placeholder="搜索文章">
              </div>
              <button type="submit" class="am-btn am-btn-default am-btn-sm">搜索</button>
            </form> -->
         </div>
      </div>
    </header>
    <div class="am-g am-g-fixed blog-g-fixed">
      <div class="blog-main">
        
        <?php
            if(isset($this->params['breadcrumbs'])){
                echo '<div class="am-u-md-12">';
                echo "<ol class='am-breadcrumb'>","<li><a href='/'>首页</a></li>";
                foreach ($this->params['breadcrumbs'] as $url => $text) {
                    if($url == 'active'){
                        echo "<li class='am-active'>",$text,"</li>";
                        continue;
                    }
                    echo "<li><a href='",$url,"'>",$text,"</a></li>";
                }
                echo "</ol>";
                echo "</div>";
            }
        ?>
        <?=$content ?>
        <div class="am-cf"></div>
      </div>
    </div>
</div>
<footer class="blog-footer">
  <p>sickeeer's blog<br/>
    <small>&copy; Copyright <?= date('Y') ?>.Powered by YII2 & Assets by AmazeUI.  Designed by Sickeeer</small>
  </p>
</footer>

<!--[if lt IE 9]>
<script src="http://libs.baidu.com/jquery/1.11.1/jquery.min.js"></script>
<script src="http://cdn.staticfile.org/modernizr/2.8.3/modernizr.js"></script>
<script src="/js/amazeui.ie8polyfill.min.js"></script>
<![endif]-->

<!--[if (gte IE 9)|!(IE)]><!-->
<script src="/js/jquery.min.js"></script>
<!--<![endif]-->
<script src="/js/amazeui.min.js"></script>

<?php $this->endBody()  //引入AppAsset js?>
<?php if (isset($this->blocks['js'])): ?>
    <?= $this->blocks['js'] ?>
<?php endif; ?>
</body>
</html>
<?php $this->endPage() ?>
